import request from '@/utils/request'

export const getRoles = (params: any) =>
  request({
    url: '/getRoles',
    method: 'post',
    params
  })
export const updateRole = (data: any) =>request.post(`/updateRoles`,data)
export const deleteRole = (id: number) =>request.post(`/deleteRoles`,{ roleId: id })


export const getRoleMenus = (params: any) =>request.post(`/getRoleMenus`,params)

export const updateRoleMenus = (data: any) =>request.post(`/updateRoleMenus`,data)

export const deleteRoleMenus = (id: number) =>request.post(`/deleteRoleMenus`,{ roleMenuId: id })